package com.ronan.imserver.rpc;

import com.ronan.common.pojo.RimUmsInfo;
import com.ronan.common.pojo.business.AddGVReq;
import com.ronan.imserver.rpc.fallback.RpcWebServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * FileName    : com.ronan.imserver.service
 * Description :
 *
 * @author : ronan
 * @version : 1.0
 * Create Date : 2021/2/27 14:35
 **/
@Component
@FeignClient(value = "mirage-im-web", fallback = RpcWebServiceImpl.class)
public interface RpcWebService {


    /**
     * 离线
     *
     * @param ums 用户
     */
    @PostMapping(value = "/im/web/ums/offline")
    void offline(@RequestBody @Validated RimUmsInfo ums);


    /**
     * 测试案例
     *
     * @param req 请求参数
     */
    @RequestMapping(value = "/im/web/gv/addGV",method = RequestMethod.POST)
    void addGV(@RequestBody @Validated AddGVReq req);
}
